SCRequestString

part of wslib

A string request window class

SCRequestString( "john doe", "please enter your name", { |str| ("your name is " ++ str).postln });

SCRequestString ( default, question, action )

the action function receives the entered string as the first argument.

the variuos items contained in the SCStringView class can be accessed through instance variables:

window

the window of the SCRequestString

stringView

the SCTextView

buttonViews

the "cancel" and "ok" buttons

action

the action

string / string_

the current string in the view

keyDownAction / keyDownAction_

you can set a keyDownAction for the SCTextView.

SCRequestString( "john doe", "please enter your name" ).keyDownAction_({ |aa| aa.string.postln })